<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Gregwar\Captcha\CaptchaBuilder;
use Session;
use App\Model\Admin\AdminLogin;
use DB;

class LoginController extends Controller
{
    /**
     * 渲染登陆页面
     *
     * @return \Illuminate\Http\Response
     */
    public function login()
    {
        //
        return view('admin.login');
    }


    /**
     * 
     *
     * 获取验证码 调用MODEL的静态方法
     */
    public function code($id)
    {
        //
       AdminLogin::getCode($id);
    }

  /**
     * 判断登陆信息
     * 调用MODEL
     * @return 
     */
    public function isLogin(Request $request)
    {

       // dd($request->name);
     return AdminLogin::getLogin($request);
       
    }


}
